function img_check(a, b, c, d, e, f, g, h, i, j, k) {
	if(checkUserType() == 0){
			location.href="index.html"
		}
	var l = $("#" + j).val();
	a = $("#" + f), this.AllowExt = ".jpg,.gif,.jpeg,.png,.pjpeg", this.FileExt = a.val().substr(a.val().lastIndexOf("."))
		.toLowerCase(), 0 != this.AllowExt && -1 == this.AllowExt.indexOf(this.FileExt) ? $("#" + g).text(
			"只支持jpg、gif、png、jpeg格式，请重新上传").show() : ($("#" + g).text("").hide(), $.ajaxFileUpload({
			url: path + "uploadProductImg",
			secureuri: !1,
			fileElementId: f,
			data: {
				type: j,
				myfiles: a.val()
			},
			dataType: "text",
			async: false,
			success: function(a) {
				"" != a ? ($("#" + k).val(a), $("#" + i + " img").attr("src", ctx + "/" + a), $("#" + h).hide(), $("#" + i).show()) :
					$("#" + g).text("上传失败，请重新上传").show()
			},
			error: function() {
				//$("#" + g).text("上传失败，请重新上传").show()
				$.ajax({
					url: path + "selectCompanyProductImg",
					type: "POST",
					data: {type: j},
					dataType: "json",
					crossDomain: true,
					xhrFields: {
						withCredentials: true
					},
					async: false,
				}).done(function(data) {
					if(data.image != undefined){
						console.log($("#" + i + " img"))
						$("#" + k).val(data.image), $("#" + i + " img").attr("src", path + data.image), $("#" + h).hide(), $("#" + i).show()
					}else{
						$("#" + g).text("上传失败，请重新上传").show()
					}
				})
			}
		}))
}

